<?php
use yii\helpers\Url;
use yii\widgets\ActiveForm;
use yii\captcha\Captcha;
/**
 * Created by PhpStorm.
 * User: Winter
 * Date: 2016/4/29
 * Time: 11:38
 */
/* @var $this yii\web\View */

$this->title = '机动车违法';
$this->registerJsFile('@web/js/history.js');
$this->registerJsFile('@web/js/jquery.longpress.js');
$this->registerJsFile('@web/js/query/query.js');
?>
<div class="cell">
    <div class="weui_cells_tips">
        <p class="wxcs_text_size_page_title">仅支持广东省违章查询</p>
    </div>
    <div class="bd">
        <div class="weui_cells weui_cells_form" style="margin: 0">
            <div class="weui_cell ">
                <div class="weui_cell_hd">
                    <label class="weui_label">车牌号码</label>
                </div>
                <div class="weui_cell_bd weui_cell_primary">
                    <select  class="weui_select_winter" id="car_province">
                        <option value ="粤">粤</option>
                    </select>
                </div>
                <div class="weui_cell_bd weui_cell_primary">
                    <select class="weui_select_winter" id="car_preid">
                        <option value ="A">A</option>
                        <option value ="B">B</option>
                        <option value ="C">C</option>
                        <option value ="D">D</option>
                        <option value ="E">E</option>
                        <option value ="F">F</option>
                        <option value ="G">G</option>
                        <option value ="H">H</option>
                        <option value ="I">I</option>
                    </select>
                </div>
                <div class="weui_cell_bd">
                    <input class="weui_input" type="text" id="input_car" placeholder="请输入车牌号"/>
                </div>
            </div>
            <div class="weui_cell" id="error_card" style="display: none">
                <div class="weui_cell_warn weui_cells_tips"></div>
            </div>
            <div class="weui_cell weui_cell_tips">
                <div class="weui_cell_hd">
                    <label class="weui_label">车身架号</label>
                </div>
                <div class="weui_cell_bd weui_cell_primary">
                    <input class="weui_input" type="text" id="input_bodyno" placeholder="请输入车身架后4位"/>
                </div>
                <div class="weui_cell_ft">
                    <i class="weui_icon_info_circle" id="btn_bodyno_tips"></i>
                </div>
            </div>
            <div class="weui_cell" id="error_bodyno" style="display: none">
                <div class="weui_cell_warn weui_cells_tips"></div>
            </div>
            <div class="weui_cell" id="bodyno_tips_layout" style="display: none">
                <div class="weui_cell_bd">
                    <img width="100%" src="<?=Url::to('@web/', true) ?>images/car.png" />
                </div>
            </div>
            <div class="weui_cell weui_vcode">
                <div class="weui_cell_hd"><label class="weui_label">验证码</label></div>
                <div class="weui_cell_bd weui_cell_primary">
                    <input class="weui_input" type="number" placeholder="请输入验证码"/>
                </div>
                <div class="weui_cell_ft">
                    <?php
                    $form = ActiveForm::begin([
                        'action' => ['index.php/query/captcha'],
                        'method'=>'get',
                    ]);
                    ?>
                    <?php
                    echo Captcha::widget(['name'=>'captchaimg','captchaAction'=>'query/captcha',
                        'imageOptions'=>['id'=>'captchaimg', 'title'=>'换一个', 'alt'=>'换一个',
                        'style'=>'cursor:pointer;'],'template'=>'{image}']);
                    ?>
                    <?php
                    ActiveForm::end();
                    ?>
                </div>
            </div>
            <div class="weui_cell" id="error_vcode" style="display: none">
                <div class="weui_cell_warn weui_cells_tips"></div>
            </div>
        </div>
        <div class="weui_btn_area" style="padding-bottom:10px;">
            <a class="weui_btn weui_btn_primary" id="btn_query" href="#">查询</a>
        </div>
        <div class="bd" id="history_area" style="padding-bottom:10px;display:none;">
            <div class="weui_cells_tips">查询历史：</div>
        </div>
    </div>
</div>
<div class="weui_loading_toast" id="loading_dialog" style="display:none;">
    <div class="weui_mask_transparent"></div>
    <div class="weui_toast">
        <div class="weui_loading">
            <div class="weui_loading_leaf weui_loading_leaf_0"></div>
            <div class="weui_loading_leaf weui_loading_leaf_1"></div>
            <div class="weui_loading_leaf weui_loading_leaf_2"></div>
            <div class="weui_loading_leaf weui_loading_leaf_3"></div>
            <div class="weui_loading_leaf weui_loading_leaf_4"></div>
            <div class="weui_loading_leaf weui_loading_leaf_5"></div>
            <div class="weui_loading_leaf weui_loading_leaf_6"></div>
            <div class="weui_loading_leaf weui_loading_leaf_7"></div>
            <div class="weui_loading_leaf weui_loading_leaf_8"></div>
            <div class="weui_loading_leaf weui_loading_leaf_9"></div>
            <div class="weui_loading_leaf weui_loading_leaf_10"></div>
            <div class="weui_loading_leaf weui_loading_leaf_11"></div>
        </div>
        <p class="weui_toast_content"></p>
    </div>
</div>
<div class="weui_dialog_alert" id="alert_dialog" style="display: none">
    <div class="weui_mask"></div>
    <div class="weui_dialog">
        <div class="weui_dialog_hd"></div>
        <div class="weui_dialog_bd">内容</div>
        <div class="weui_dialog_ft">
            <a href="#" class="weui_btn_dialog primary">确定</a>
        </div>
    </div>
</div>
<!--BEGIN dialog1-->
<div class="weui_dialog_confirm" id="confirm_dialog" style="display: none;">
    <div class="weui_mask"></div>
    <div class="weui_dialog">
        <div class="weui_dialog_hd"><strong class="weui_dialog_title">弹窗标题</strong></div>
        <div class="weui_dialog_bd">是否删除该信息</div>
        <div class="weui_dialog_ft">
            <a href="javascript:hideConfirmDialog();" class="weui_btn_dialog default">取消</a>
            <a href="javascript:deleteHistory();" class="weui_btn_dialog primary">确定</a>
        </div>
    </div>
</div>
<!--END dialog1-->